package com.usian.controller;

import com.usian.pojo.User;
import com.usian.service.ProviderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ProviderController {
    @Autowired
    private ProviderService providerService;
    @GetMapping("/getUserById/{id}")
    public User getUserById(@PathVariable Integer id){

        return   providerService.getById(id);
    }
    @GetMapping("/getUserById2")
    public User getUserById2(Integer id,String nam){

        return   providerService.getById(id,nam);
    }
}
